import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("bianli_service", { schema: "alumni" })
export class BianliService {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("int", {
    name: "school_id",
    comment: "所属学校",
    unsigned: true,
    default: () => "'0'",
  })
  schoolId: number;

  @Column("varchar", { name: "name", length: 200, default: () => "'名称'" })
  name: string;

  @Column("varchar", { name: "icon", comment: "图标", length: 100 })
  icon: string;

  @Column("varchar", { name: "url", comment: "url", length: 100 })
  url: string;

  @Column("varchar", { name: "mini_url", comment: "小程序url", length: 100 })
  miniUrl: string;

  @Column("int", {
    name: "sort",
    comment: "排序越大越靠前",
    unsigned: true,
    default: () => "'0'",
  })
  sort: number;

  @Column("int", {
    name: "type",
    comment: "类型",
    unsigned: true,
    default: () => "'0'",
  })
  type: number;

  @Column("int", {
    name: "creator_id",
    comment: "创建人",
    unsigned: true,
    default: () => "'0'",
  })
  creatorId: number;

  @Column("int", { name: "create_time", unsigned: true, default: () => "'0'" })
  createTime: number;

  @Column("int", { name: "update_time", unsigned: true, default: () => "'0'" })
  updateTime: number;
}
